Skip to content

Conversation

@Harishmcw
Copy link

@Harishmcw Harishmcw commented Dec 11, 2025

This PR adds Windows ARM64EC build support to the FFmpeg port.

Summary

  • Adds arm64ec architecture handling in portfile.cmake.
  • Passes /machine:arm64ec to lib.exe, armasm64, and linker flags.
  • Updates gas-preprocessor to latest revision that supports ARM64EC.
  • Extends AR and dumpbin logic to correctly process ARM64EC static libraries.
  • Improves makedef to handle ARM64EC:
    • Uses dumpbin -linkermember:32 (required for ARM64EC archives).
    • Filters out $entry_thunk / $exit_thunk symbols.
    • Normalizes leading # on symbols.

These changes enable FFmpeg to successfully build as ARM64EC while keeping behavior unchanged for all other architectures.

@@ -0,0 +1,77 @@
diff --git a/compat/windows/makedef b/compat/windows/makedef
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are fairly large patches, have you submitted them upstream?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @BillyONeal,

Yes, these patches were submitted upstream to FFmpeg. However, the maintainers indicated that ARM64EC support would require ongoing maintenance and therefore could not be merged at this time, so we are providing ARM64EC support through vcpkg.

Copy link
Member

@BillyONeal BillyONeal Jan 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the maintainers indicated that ARM64EC support would require ongoing maintenance and therefore could not be merged at this time

Unfortunately that sounds like upstream explicitly declining to take the patch which would be a reason we would not take this. See https://learn.microsoft.com/vcpkg/contributing/maintainer-guide#patching

... our most important thing is we don't put words in upstream's mouth and if they have explicitly declined to do something we are not a means to go around their wishes.

(I understand that arm64ec is a thing Microsoft cares about in some capacity and vcpkg is a Microsoft product but that doesn't mean we are sponsoring development of everything in vcpkg's registry)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(You could consider doing vanilla arm64 and calling ffmpeg out-of-proc from arm64ec apps)

@BillyONeal BillyONeal marked this pull request as draft December 12, 2025 01:32
@BillyONeal
Copy link
Member

Drafted due to CLA.

You should be able to fix the build failures with vcpkg x-add-version ffmpeg

@Harishmcw
Copy link
Author

Hi @BillyONeal,

We have also submitted these patches upstream. However, the FFmpeg maintainers noted that ARM64EC support would require ongoing maintenance, so the ARM64EC-specific changes couldn't be merged at this time.

Therefore, we would like to provide ARM64EC support for FFmpeg through vcpkg, as this would enable several applications such as Jianying Pro and WPS Office to build and run successfully for the ARM64EC target.

I have initiated the CLA approval process within our organization and will respond to the CLA as soon as internal approval is granted.

Thanks.

This update adds ARM64EC support to the FFmpeg vcpkg port.

Key changes:
- Enable ARM64EC architecture handling in portfile.cmake.
- Add /machine:arm64ec flags for lib.exe, armasm64, and linker.
- Update gas-preprocessor to a newer revision required for ARM64EC.
- Extend assembler, AR, and dumpbin logic to correctly process ARM64EC binaries.

This allows FFmpeg to be successfully built for Windows ARM64EC using the vcpkg toolchain.
@Harishmcw
Copy link
Author

@microsoft-github-policy-service agree company="Multicoreware"

@Harishmcw Harishmcw marked this pull request as ready for review January 9, 2026 04:14
@vicroms vicroms added the requires:vcpkg-team-review This PR or issue requires someone on the vcpkg team to take a further look. label Jan 10, 2026
@Harishmcw Harishmcw requested a review from BillyONeal January 12, 2026 04:18
@vicroms
Copy link
Member

vicroms commented Jan 16, 2026

I'm closing this PR due to the reasons stated in BIlly's comment: #48803 (comment)

We recommend that you create a custom registry with your changes, that way you can still use vcpkg to install ffmpeg and include your ARM64EC fixes.

@vicroms vicroms closed this Jan 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

requires:vcpkg-team-review This PR or issue requires someone on the vcpkg team to take a further look.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants